Skip to content

Improve tactics flank and suppress actions#446

Merged
nk3nny merged 5 commits intomasterfrom
Improve-Tactics-Flank-and-Suppress-actions
Oct 9, 2025
Merged

Improve tactics flank and suppress actions#446
nk3nny merged 5 commits intomasterfrom
Improve-Tactics-Flank-and-Suppress-actions

Conversation

@nk3nny
Copy link
Copy Markdown
Owner

@nk3nny nk3nny commented Sep 28, 2025

This pull request adds better exit conditions to suppression and flanking group actions-- and makes these actions more reliable in terms of handling vehicles, picking suppression targets, and actual movement. Some of the introduced changes will make #442 redundant.

In practice this means mission makers can interrupt group level tactical actions at any time. Fitting something like this code into the mod or a mission will also allow ZEUS players to interrupt ongoing tactics and issue new movement orders.


["ModuleCurator_F", "init", {

    (_this select 0) addEventHandler ["CuratorWaypointPlaced", {
        params ["_curator", "_group", "_waypointID"];

        // update variables
        _group setVariable [QEGVAR(danger,isExecutingTactic), false, true];
        _group setVariable [QEGVAR(main,groupMemory), [], true];

        // clear targets
        private _leader = leader _group;
        private _waypointPos = getWPPos [_group, _waypointID];

        // forget enemies that are distant to waypoint
        if (local _leader && {_leader distance2D _waypointPos > 300}) then {

            private _enemies = (_leader targets [true]) select {_x distance2D _wayPointPos > 300};
            {
                _group forgetTarget _x;
            } forEach _enemies;
        };
    }];
}, true, [], true] call CBA_fnc_addClassEventHandler;


danger\fnc_tacticsAssess.sqf

  • Tweaks timings.
  • Removes _units. This makes the functions more flexible.

danger\fnc_tacticsFlank.sqf

  • Adds exit condition to tactic check
  • Adds more positions to shoot at
  • Adds better handling of vehicles and their cargo
  • Changes previous variable name "_pos" to "_posList" to better distinguish it.

danger\fnc_tacticsSuppress.sqf

  • Adds exit condition to tactic check
  • Changes previous variable name "_pos" to "_posList"

main\fnc_checkVisibilityList.sqf

  • Adds a new checkVisibilityList function to pick better suppression targets from a list

main\group\fnc_doGroupFlank.sqf

  • Adds exit conditions
  • Improves vehicle suppression and movement reliability
  • Changes previous variable name "_pos" to "_posList"

main\group\fnc_doGroupSuppress.sqf

  • Adds exit conditions
  • Adds more robust suppression target selection to both infantry and vehicles
  • Changes previous variable name "_pos" to "_posList"

…actics

This pull request adds better exit conditions to suppression and flanking group actions-- and makes these actions more reliable in terms of handling vehicles, picking suppression targets, and actual movemement. Some of the introduced changes will make #442 redundant.

In practice this means mission makers can interrupt group level tactical actions at any time.

danger\fnc_tacticsAssess.sqf
 - Tweaks timings.
 - Removes _units. This makes the functions more flexible.

danger\fnc_tacticsFlank.sqf
- Adds exit condition to tactic check
- Adds more positions to shoot at
- Adds better handling of vehicles and their cargo
- Changes previous variable name "_pos" to "_posList" to better distinguish it.

danger\fnc_tacticsSuppress.sqf
- Adds exit condition to tactic check
- Changes previous variable name "_pos" to "_posList"

main\fnc_checkVisibilityList.sqf
- Adds a new checkVisibilityList function to pick better suppression targets from a list

main\group\fnc_doGroupFlank.sqf
- Adds exit conditions
- Improves vehicle suppression and movement reliability
- Changes previous variable name "_pos" to "_posList"

main\group\fnc_doGroupSuppress.sqf
- Adds exit conditions
- Adds more robust suppression target selection to both infantry and vehicles
- Changes previous variable name "_pos" to "_posList"
@nk3nny nk3nny self-assigned this Sep 28, 2025
tacticsFlank - get vehicle loaded units earlier in process to allow for mech-inf attacks
checkVisibilityList - performance improvements
doGroupFlank - performance improvements. Paerticularly as it relates to infantry.  Fixes groups with vehicle leaders not moving
doGroupSuppress - Minor performance improvement
@nk3nny nk3nny merged commit cc30abd into master Oct 9, 2025
4 checks passed
@nk3nny nk3nny deleted the Improve-Tactics-Flank-and-Suppress-actions branch October 9, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants